<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" type="text/css" href="<c:out value="${pageContext.request.contextPath}" />/resources/common/js/dhtmlx_std_full/dhtmlx.css">
<script src="<c:out value="${pageContext.request.contextPath}" />/resources/common/js/dhtmlx_std_full/dhtmlx.js"></script>
<script>
var dhxLayout;
dhtmlxEvent(window, "load", function() {
    var dhxMenu = new dhtmlXMenuObject("menuDiv");
    dhxMenu.addNewSibling(null, "File", "File");
    dhxMenu.addNewChild("File", 0, "New", "New");
    dhxMenu.addNewChild("File", 1, "Logout", "Logout");
    dhxMenu.addNewChild("File", 2, "Close", "Close");
    
    dhxMenu.addNewSibling("File", "Help", "Help");
	
    dhxLayout = new dhtmlXLayoutObject("parentId", "2U");

    dhxLayout.cells("a").setText("Topology View");
    dhxLayout.cells("a").setWidth(200);
    
    dhxLayout.cells("b").setText("Main Contents");
    
    var dhxTree = dhxLayout.cells("a").attachTree();
    dhxTree.setImagePath("${pageContext.request.contextPath}" + "/resources/common/js/dhtmlx_std_full/imgs/");
	
    dhxTree.insertNewChild(0, "root", "/");
    dhxTree.insertNewChild("root", "child1", "child1");
    dhxTree.insertNewChild("child1", "child1-1", "child1-1");

    var data = [
                { sales:2.9, year:"2000" },
                { sales:3.5, year:"2001" }
                ];
    
    var chart =  new dhtmlXChart({
    	view: "line",
    	container: dhxLayout.cells("b"),
    	value: "#sales#",
        label: "#year#"    
    });
    
    chart.parse(data,"json");
    
    alert("aaa");
    
});
</script>
</head>
<body>
<div id="menuDiv" style="position: relative; top: 0px; left: 20px; width: 800px; aborder: #B5CDE4 1px solid;"></div>
<div id="parentId" style="position: relative; top: 10px; left: 20px; width: 800px; height: 600px; aborder: #B5CDE4 1px solid;"></div>
</body>
</html>